package com.starhub.application.collection.service;

import com.starhub.application.collection.entity.KnowledgeBase;
import com.starhub.common.sys.user.LoginUser;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 知识库服务接口
 * @version: V1.0
 * @author: luosw
 * @time 2025-06-20
 */
public interface KnowledgeBaseService {
    
    /**
     * 插入知识库
     * @param knowledgeBase
     * @return
     */
    int insert(KnowledgeBase knowledgeBase);
    
    /**
     * 更新知识库
     * @param knowledgeBase
     * @return
     */
    int updateById(KnowledgeBase knowledgeBase);
    
    /**
     * 根据ID查询知识库
     * @param id
     * @return
     */
    KnowledgeBase selectById(Long id);
    
    /**
     * 根据ID查询未删除的知识库
     * @param id
     * @return
     */
    KnowledgeBase selectByIdAndNotDeleted(Long id);


    /**
     * 逻辑删除
     * @param id
     * @return
     */
    int deleteById(Long id);


    /**
     * 物理删除
     * @param id
     * @return
     */
    int deleteRecord(Long id);


    /**
     * 批量查询接口
     * @param params
     * @return
     */
    List<KnowledgeBase> selectByMap(Map<String, Object> params);

    /**
     * 获取启用的知识库
     * @param params
     * @return
     */
    List<KnowledgeBase> getActiveKnowledgeBase(Map<String, Object> params);
}
